﻿<!--***********************************************************************************

   Extended WPF Toolkit

   Copyright (C) 2007-2013 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at http://xceed.com/wpf_toolkit

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  **********************************************************************************-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
                    xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes">

    <Style x:Key="{x:Static themes:ResourceKeys.SpinnerButtonStyleKey}" TargetType="RepeatButton">
        <Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="2,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <chrome:ButtonChrome x:Name="Chrome"
                                       BorderBrush="{TemplateBinding BorderBrush}" 
                                       Background="{TemplateBinding Background}"                                                                  
                                       CornerRadius="{DynamicResource {x:Static themes:ResourceKeys.SpinButtonCornerRadiusKey}}"
                                       RenderEnabled="{TemplateBinding IsEnabled}"
                                       RenderMouseOver="{TemplateBinding IsMouseOver}"
                                       RenderNormal="True"
                                       RenderPressed="{TemplateBinding IsPressed}"
                                       SnapsToDevicePixels="true" />

                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
